package com.strive.common.lock;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @description:
 * @author: bingcun.chen
 * @Date: 2022/2/21 14:48
 * @Version 1.0
 */
@AllArgsConstructor
public class ZLock implements AutoCloseable{
    @Getter
    private final Object lock;

    private final DistributedLock locker;


    @Override
    public void close() throws Exception {
        locker.unlock(lock);
    }
}
